/*写法1：

import Vue from "vue"
import toSearch from "./toSearch.vue"
import vButton from "./vButton.vue"
// Vue.component("toSearch",toSearch)
// Vue.component("vButton",vButton)


let obj = {
    toSearch: toSearch,
    vButton,
}
for(let k in obj){
    Vue.component(k, obj[k])
}
*/

// 写法2
import toSearch from "./toSearch.vue"
import vButton from "./vButton.vue"
import showList from "./showList.vue"
let obj = {
    toSearch: toSearch,
    vButton,
    showList,
}

export let CommonComponent = {
    install(Vue) {
        // Vue.component("toSearch",toSearch)
        // Vue.component("vButton",vButton)
        Object.keys(obj).forEach(k => Vue.component(k, obj[k]))
    }
}